package com.snowfeel.sfmall.core.enums;

/**
 * @author guomenghuai
 * @date 2024/8/24
 * @Description
 */
public enum ResponseCode implements ResultCode {

    SUCCESS("0000", "操作成功！"),
    FAIL("500", "操作失败！"),
    UN_ERROR("0001", "未知失败"),
    ILLEGAL_PARAMETER("0002", "非法参数"),

    NOT_FOUND("0003", "记录不存在"),

    UNAUTHORIZED("401", "暂未登录或token已经过期"),
    FORBIDDEN("403", "没有相关权限");
    ;

    ResponseCode(String code, String message) {
        this.code = code;
        this.message = message;
    }

    private String code;
    private String message;

    @Override
    public String getCode() {
        return code;
    }

    @Override
    public String getMessage() {
        return message;
    }
}
